#ifndef __TGRXIMPLCLASS_H__
#define __TGRXIMPLCLASS_H__

#if _MSC_VER > 1000
#pragma once
#endif

typedef TGRxObject* (* makeObjCallBackFunc)();

class TGRxImplClass : public TGRxClass  
{
	TGRX_DECLARE_MEMBERS(TGRxImplClass)

public:
			 TGRxImplClass();
	virtual ~TGRxImplClass();

public:
	void					setClassName(const char * pszClassName);
	const char *			className();

	void					setParentClassName(const char * pszParentClassName);
	const char *			parentClassName();

	void					setMDLVer(int nMDLVer);
	int						mdlVer();

	void					setClassVer(int nClassVer);
	int						classVer();

	void					setProxyFlags(int nFlags);
	int						proxyFlags();

	void					setMakeClassObjFunc(makeObjCallBackFunc pFunc);
	makeObjCallBackFunc		makeClassObjFunc();

	void					setAppName(const char * pszAppName);
	const char *			appName();

public:
    virtual TGRxObject*		addX(TGRxClass* pRxClass, TGRxObject* pRxObject);
    virtual TGRxObject*		getX(TGRxClass* pRxClass);
    virtual TGRxObject*		delX(TGRxClass* pRxClass);
    virtual TGRxObject*		queryX(TGRxClass* pProtocolClass);
	
    virtual TGRxObject*		create();
    virtual const char*		appName() const;
    virtual const char*		name() const;
	
    virtual void			getClassVersion(int& nMdlVer,int& nClassVer) const;
    virtual int				proxyFlags() const;
	
    virtual BOOL			isDerivedFrom(const TGRxClass* pRxClass) const;
    virtual TGRxClass*		myParent() const;

private:
	void					freeBuffer();

private:
	char*					m_pszClassName;
	char*					m_pszParentClassName;
	char*					m_pszAppName;
	int						m_nMDLVer;
	int						m_nClassVer;
	int						m_nProxyFlag;
	makeObjCallBackFunc		m_pMakeClassObjFunc;
	CMapPtrToPtr			m_mapRxClass2RxObj;
};

#endif // __TGRXIMPLCLASS_H__
